package com.ylr.blog.common.vo.audit_blog;

import com.ylr.base.common.constant.Constant;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-05-26 10:48:43
 * className: AuditVo
 * version: 1.0
 * description:
 */
@Getter
@Setter
@ToString
public class AuditVo {

    /**
     * 待审核博客主键
     */
    @NotNull(message = "主键不能为空")
    private Long id;

    /**
     * 博客主键
     */
    @NotNull(message = "博客主键不能为空")
    private Long blogId;

    /**
     * 博客编号
     */
    @NotBlank(message = "博客编号不能为空")
    private String blogCode;

    /**
     * 审核回复
     */
    private String reply;

    /**
     * 审核结果[0-通过 1-拒绝]
     */
    @NotNull(message = "审核结果不能为空")
    private Integer auditResult;

    /**
     * 是否审核拒绝
     * @return true-是 false-否
     */
    public boolean isAuditReject() {
        return !Constant.ZERO.equals(auditResult);
    }

}
